const net = require('net')

const server = net.createServer(socket => {
  socket.on('data', data => {
    console.log(data.toString('utf-8'));
    
  })
})

server.listen(8080, () => {
  console.log('Server is listening on ', server.address());
})